home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Publication 4
/
Publication_04_19xx_High-Tech_de_Side_B.d64
/
roem. zahlen
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
898b
|
36 lines
4 goto200
5 poke53280,0:poke53281,0
10 dim r(8)
20 data 1000,500,100,50,10,5,1,0,0
30 forx=0to8:readr(x):next
40 r$="mdclxvi"
50 input"[147][155] arabische zahl";a$:a=val(a$)
51 ifa<=0ora>5000thenprint"[145][145][145][145][145][145]":goto50
60 print" [159]";a;"= roemischer wert= [154]";
70 forx=0to6
80 ifa>=r(x)thenprintmid$(r$,x+1,1);:a=a-r(x):goto80
90 y=1+2*int((x+2)/2)
100 ifa>=r(x)-r(y-1)thenprintmid$(r$,y,1);:a=a+r(y-1):goto80
110 next
120 print:print"[155] noch eine ausgabe (j/n)?"
130 getg$:ifg$=""then130
140 ifg$="j"then50
150 ifg$="n"then5000
160 goto130
200 print"[147][156]":poke53280,0:poke53281,0
210 print" roemisch/arabisch"
211 print" zahlen-umwandlung[154]"
212 print" karlheinz herpel[129]"
213 print" (c) 1985 "
220 printtab(14)"drueck space"
221 poke198,0:wait198,1:gete$
222 ife$=chr$(32)then5
223 goto221
5000 print"[147]"
5001 printtab(8)"programm beenden [1]"
5002 printtab(8)"programm wiederholen [2]"
5004 poke198,0:wait198,1:gete$
5005 ife$="1"thensys64760
5006 ife$="2"then50
5008 goto5004